#ifndef QUERYWIDGET_H
#define QUERYWIDGET_H

#include <QtGui>
#include <QtSql>
#include "schema.h"
#include "textedit.h"
#include "ui_querywidget.h"

class QueryWidget: public QWidget, private Ui::QueryWidget
{
Q_OBJECT

public:

QueryWidget(QString collection_table_arg,
            int number_of_collections,
            QString last_exp_save_dir);
~QueryWidget();

public slots:

void exec_query();
void export_xml();
void show_q1();
void show_q2();
void show_q3();
void show_q4();
void show_q5();

private:

void writeSettings();
void readSettings();
void delete_model();
QStringList column_names_list;
TextEdit * queryTextEdit;
QString last_query;
QString q1;
QString q2;
QString q3;
QString q4;
QString q5;
QString collection_table;
QString last_path;

protected:

void closeEvent( QCloseEvent * e );

};

#endif
